1. Field of the Invention
The present invention relates in general to a display adapter unit for a computer, and more particularly to a method and apparatus for processing a line-graphic in a 2 bytes character mode of a display adapter unit, whereby a line-graphic code can be prevented from being mis-discriminated as a 2 bytes character code in the 2 bytes character mode and thus processed as a line on a screen.
2. Description of the Prior Art
In a computer, generally, binary values of 0 to 255 may be used to represent all characters, numbers and symbols designated by a disk operating system (DOS). The former or first 128 values (0-127) may be used to represent general numbers, characters and punctuations and are known as a set of ASCII characters. The latter or last 128 values (128-255) may be used as extended ASCII characters.
On the other hand, in a case (for example, Hangul or Chinese character) where each characters cannot be represented by only 1 byte , 2 bytes data may be used to represent one character. 128-255 values are applied to 2 bytes character codes and the most significant bit (the eighth bit:MSB) of each of the codes is "1". In this case, the most significant bit MSB is used for identification and the remaining 7 bits are data bits.
For this reason, in a case where a computer is operated in a 2 bytes character mode such as, for example, Hangul or Chinese character, in order to use 1 byte character codes capable of representing alphabetical characters or extended ASCII characters in an application program of the 2 bytes character mode, there is a necessity for discriminating between the 2 bytes and 1 byte character codes.
A conventional method of discriminating the 1 byte character code from the 2 bytes character code is performed by utilizing a 1 byte/2 bytes character code discriminator 1 as shown in FIG. 1, which is a block diagram of the code discriminator 1. The 1 byte/2 bytes character code discriminator 1 retrieves the most significant bit MSB of each of character codes CR inputted therein to discriminate whether the most significant bit MSB value is "1" or "0 ". If the most significant bit MSB value is "1", the character code CR is the 2 bytes character code. On the contrary, if the most significant bit MSB value is "0", the character code CR is the 1 byte character code.
The operation of the 1 byte/2 bytes character code discriminator 1 is performed as shown in FIG. 2.
Referring to FIG. 2, there is shown a flowchart illustrating the operation of the 1 byte/2 bytes character code discriminator 1. In operation, the 1 byte/2 bytes character code discriminator 1, upon inputting the character codes CR at its input terminal IN, decodes the character codes CR to discriminate whether the most significant bit MSB value of each of the codes is "1" or "0". If the most significant bit MSB value of the current inputted character code is "0" as a result of decoding 1 byte of the code, the 1 byte/2 bytes character code discriminator 1 discriminates the current inputted character code as the 1 byte character code and thus outputs a 1 byte character code discriminate signal (H/E="0") at its output terminal OUT. As a result, the current inputted character code is processed as the 1 byte character code.
On the other hand, if the most significant bit MSB value of the current inputted character code is "1" as a result of decoding the 1 byte of the code, the 1 byte/2 bytes character code discriminator 1 decodes 1 byte of the next inputted character code. If the most significant bit MSB value of the next inputted character code is "0" in accordance with the decoded result, the 1 byte/2 bytes character code discriminator 1 discriminates the current and next inputted character codes respectively as the 1 byte character codes and thus outputs the 1 byte character code discriminate signals (H/E="0") at its output terminal OUT. As a result, the current and next inputted character codes are processed as the 1 byte character code, respectively.
On the contrary, if the most significant bit MSB value of the current inputted character code is "1" and the most significant bit MSB value of the next inputted character code is "1", the 1 byte/2 bytes character code discriminator 1 discriminates a combination of the current and next inputted character codes as the 2 bytes character code and thus outputs a 2 bytes character code discriminate signal (H/E="1") at its output terminal OUT. As a result, the combination of the current and next inputted character codes is processed as the 2 bytes character code, since the most significant bit MSB values of the inputted two successive character codes are "1" all.
On the other hand, in a case where 1 byte characters are used to execute an application program in the 2 bytes character mode, ASCII application codes in which the most significant bit MSB values all are "1" may be used as line-graphic codes for depicting lines, perhaps horizontal lines. As a result, in this case, the character codes in which the most significant bit MSB values all are "1" are inputted successively. Namely, the most significant bit MSB values of the two successive character codes are "1" all. This causes the above-mentioned conventional 1 byte/2 bytes character code discriminator 1 to mis-discriminate the line-graphic codes to be processed as the 1 byte character codes, as the 2 bytes character codes. For this reason, when the application program is executed to depict graphics such as, for example, tables in the 2 bytes character mode using the 1 byte character codes, graphic lines of the tables to be depicted may be represented as 2 bytes characters in the application program.
For instance, as shown in FIG. 3A, in the 1 byte character mode, row lines P1 and row-coloum cross points P2 of a table are displayed normally on the screen, while, in the 2 bytes character mode, codes C4 for depicting the row lines P1 may be displayed as specified 2 bytes characters (for example, " . . . " in Hangul mode) on the screen as shown in FIG. 3B. As a result, it is difficult for the user to grasp the table on the screen.